﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO.Ports;
using CommunicationLibrary;

namespace TestProgramPC
{
    class Program
    {
        static SerialPort port;

        static void Main(string[] args)
        {
            CommunicationHandler handler = CommunicationFactory.GetConnectionObject("COM4", 115200);
            handler.Open();
            while (true)
            {
                switch (Console.Read())
                {
                    case 'A':
                        handler.LoadVariables();
                        break;
                    case 'B':
                        Console.WriteLine(BitConverter.ToString(handler.ReadVariable("arduin2")));
                        break;
                    case 'C':
                        
                        break;
                    default:
                        break;
                }
            }
        }
    }
}
